/**
 * 
 */
package com.liwei.ibatisspring.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.liwei.ibatisspring.dao.AccountDAO;
import com.liwei.ibatisspring.domain.Account;

/**
 * @author lidian
 * 
 */
public class AccountDAOImpl extends SqlMapClientDaoSupport implements
		AccountDAO {

	public void selectAccountById(Account account) {
		getSqlMapClientTemplate().delete("selectAccountById", account.getId());
	}

	public List selectAllAccounts() {
		return getSqlMapClientTemplate().queryForList("selectAllAccounts");
	}

	public void deleteAccountById(Account account) {
		getSqlMapClientTemplate().delete("deleteAccountById", account.getId());
	}

	public void insertAccount(Account account) {
		getSqlMapClientTemplate().insert("insertAccount", account);
	}

	public void updateAccount(Account account) {
		getSqlMapClientTemplate().update("updateAccount ", account);
	}

}
